﻿using PalletPrintProgram.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AutoUpdater.Bll
{
    public class FileCheckBll
    {
        public static string downLoadFileUrl = "";
        public static string appId = "";
        public static string appkey = "";

        public static string ServerUrl { get; set; }
        public static FileContract CheckFile(FileCheckReq fileCheckReq)
        {
            return new FileContract();
        }

        public static FileContract CheckUpdateExeFile(FileCheckReq fileCheckReq)
        {
            return new FileContract();
        }

        public static byte[] DownLoadFile(FileMessageInfo fileMessage, int fileIndex)
        {
            byte[] fileByte = RestHttpHelper.DownloadFile(downLoadFileUrl, fileMessage.savePath, appId, appkey);
            return fileByte;
        }
    }
}
